package cn.ryh.designpatterndemo.adapterpattern.objectadapterpattern;

/**
 * @ClassName ClassAdapterAdapter
 * @Description 类适配器-适配器角色
 * @Author RaoYH
 * @Date 2019/4/26
 */
public class Adapter implements Target {
    private AdapteeAge adapteeAge;
    private AdapteeName adapteeName;
    private AdapteeTel adapteeTel;

    public Adapter(AdapteeAge adapteeAge, AdapteeName adapteeName, AdapteeTel adapteeTel) {
        this.adapteeAge = adapteeAge;
        this.adapteeName = adapteeName;
        this.adapteeTel = adapteeTel;
    }


    @Override
    public void getInfo() {
        this.adapteeName.getName();
        this.adapteeAge.getAge();
        this.adapteeTel.getTel();
    }
}
